home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / utildsk / mcdplayr.lha / MCDPlayer2 / Source / mcdplayer.h < prev    next >
C/C++ Source or Header  |  1996-05-16  |  3KB  |  147 lines

  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <ctype.h>
  4. #include <exec/types.h>
  5. #include <exec/io.h>
  6. #include <exec/execbase.h>
  7. #include <exec/nodes.h>
  8. #include <exec/memory.h>
  9. #include <exec/libraries.h>
  10. #include <workbench/workbench.h>
  11. #include <workbench/startup.h>
  12. #include <devices/trackdisk.h>
  13. #include <devices/scsidisk.h>
  14. #include <devices/timer.h>
  15. #include <devices/inputevent.h>
  16. #include <libraries/dos.h>
  17. #include <clib/alib_protos.h>
  18. #include <clib/exec_protos.h>
  19. #include <clib/commodities_protos.h>
  20. #include <clib/wb_protos.h>
  21. #include <clib/intuition_protos.h>
  22. #include <intuition/intuition.h>
  23. #include <intuition/gadgetclass.h>
  24. #include <graphics/displayinfo.h>
  25.  
  26. #define VERSION "1.2"
  27.  
  28. #define BYTES_PER_LINE  16
  29. #define SENSE_LEN 252
  30. #define MAX_DATA_LEN 252
  31. #define MAX_TOC_LEN 804    /* max TOC size = 100 TOC track descriptors */
  32. #define PAD 0
  33. #define  LINE_BUF (128)
  34. #define NUM_OF_CDDAFRAMES 75  /* 75 frames per second audio */
  35. #define CDDALEN 2448    /* 1 frame has max. 2448 bytes (subcode 2) */
  36.  
  37. #define OFFS_KEY 2
  38. #define OFFS_CODE 12
  39.  
  40. typedef struct MsgPort MSGPORT;
  41. typedef struct IOStdReq IOSTDREQ;
  42. typedef struct List LIST;
  43. typedef struct Node NODE;
  44. typedef struct SCSICmd SCSICMD;
  45.  
  46. typedef struct
  47.  {
  48.    BYTE   code;
  49.    UBYTE  *ptr;
  50.  } IDTOSTRING;
  51.  
  52. typedef struct
  53.  {
  54.    UBYTE  opcode;
  55.    UBYTE  b1;
  56.    UBYTE  b2;
  57.    UBYTE  b3;
  58.    UBYTE  b4;
  59.    UBYTE  control;
  60.  } SCSICMD6;
  61.  
  62. typedef struct
  63.  {
  64.    UBYTE  opcode;
  65.    UBYTE  b1;
  66.    UBYTE  b2;
  67.    UBYTE  b3;
  68.    UBYTE  b4;
  69.    UBYTE  b5;
  70.    UBYTE  b6;
  71.    UBYTE  b7;
  72.    UBYTE  b8;
  73.    UBYTE  control;
  74.  } SCSICMD10;
  75.  
  76. typedef struct
  77.  {
  78.    UBYTE  opcode;
  79.    UBYTE  b1;
  80.    UBYTE  b2;
  81.    UBYTE  b3;
  82.    UBYTE  b4;
  83.    UBYTE  b5;
  84.    UBYTE  b6;
  85.    UBYTE  b7;
  86.    UBYTE  b8;
  87.    UBYTE  b9;
  88.    UBYTE  b10;
  89.    UBYTE  control;
  90.  } SCSICMD12;
  91.  
  92. #define  SCSI_CMD_TUR   0x00
  93. #define  SCSI_CMD_RZU   0x01
  94. #define  SCSI_CMD_RQS   0x03
  95. #define  SCSI_CMD_FMU   0x04
  96. #define  SCSI_CMD_RAB   0x07
  97. #define  SCSI_CMD_RD 0x08
  98. #define  SCSI_CMD_WR 0x0A
  99. #define  SCSI_CMD_SK 0x0B
  100. #define  SCSI_CMD_INQ   0x12
  101. #define  SCSI_CMD_MSL   0x15
  102. #define  SCSI_CMD_RU 0x16
  103. #define  SCSI_CMD_RLU   0x17
  104. #define  SCSI_CMD_MSE   0x1A
  105. #define  SCSI_CMD_SSU   0x1B
  106. #define  SCSI_CMD_RDI   0x1C
  107. #define  SCSI_CMD_SDI   0x1D
  108. #define SCSI_CMD_PAMR   0x1E
  109. #define  SCSI_CMD_RCP   0x25
  110. #define  SCSI_CMD_RXT   0x28
  111. #define  SCSI_CMD_WXT   0x2A
  112. #define  SCSI_CMD_SKX   0x2B
  113. #define  SCSI_CMD_WVF   0x2E
  114. #define  SCSI_CMD_VF 0x2F
  115. #define  SCSI_CMD_RDD   0x37
  116. #define  SCSI_CMD_WDB   0x3B
  117. #define  SCSI_CMD_RDB   0x3C
  118.  
  119. #define SCSI_CMD_COPY      0x18
  120. #define SCSI_CMD_COMPARE   0x39
  121. #define SCSI_CMD_COPYANDVERIFY   0x3A
  122. #define SCSI_CMD_CHGEDEF   0x40
  123. #define SCSI_CMD_READSUBCHANNEL  0x42
  124. #define SCSI_CMD_READTOC   0x43
  125. #define SCSI_CMD_READHEADER   0x44
  126. #define SCSI_CMD_PLAYAUDIO12  0xA5
  127. #define SCSI_CMD_PLAYAUDIOTRACKINDEX   0x48
  128. #define SCSI_CMD_PAUSERESUME    0x4B
  129.  
  130. extern struct Screen *Scr;
  131. extern struct Window *MainWnd;
  132. extern struct TextAttr topaz8;
  133. extern APTR VisualInfo;
  134.  
  135. extern UBYTE TOC_NumTracks;
  136. extern UBYTE TOC_Flags[];
  137. extern ULONG TOC_Addr[];
  138. extern char *TOC_Title[];
  139. extern char *TOC_CDTitle;
  140. extern char *TOC_CDInterpret;
  141. extern char  TOC_TitleStrs[];
  142. extern char  TOC_CDID[];
  143. extern char  SongPath[128];
  144. extern BYTE  Program[100][9];
  145. extern char  FontName[];
  146. extern UWORD offy;
  147.